﻿using OA.IBLL;
using OA.IDAL;
using OA.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OA.BLL
{
    public partial class SysPersonService : BaseService<SysPerson>, ISysPersonService
    {
        public ISysPersonRepository personRepository{ get; set; }
        public ISession Session { get; set; }

        public async Task<SysPerson> LoginAsync(string name, string pwd)
        {
            
            var result= await personRepository.GetEntityAsync(u => u.LoginName == name && u.LoginPwd == pwd);

           // await session.SaveChangesAsync();
            return result;

        }

      
    }
}
